{extend name="base" /}
{block name="content"}
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>商城</span>
            <span class="icon-angle-right"></span>
            <span>优惠券管理</span>
            <span class="icon-angle-right"></span>
            <span>我的优惠券</span>
            <span class="icon-angle-right"></span>
            <span>我的优惠券列表</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <form class="layui-form m-list-form">
                <table class="m-table mt-10">
                    <tbody class="datas">
                        <tr>
                            <th width="5%">ID</th>
                            <th width="26%">优惠券名称</th>
                            <th width="8%">会员编号</th>
                            <th width="10%">领取时间</th>
                            <th width="10%">优惠券领取方式</th>
                            <th width="10%">优惠券状态</th>
                            <!--<th width="10%">操作</th>-->
                        </tr>
                        {foreach name="data" item="v"}
                        <tr>
                            <td>{$v.id}</td>
                            <td>
                                {foreach name="coupon" item="v1"}
                                    {if condition="$v1.id eq $v.coupon_id"} {$v1.coupon_name}{/if}
                                {/foreach}
                            </td>
                            <td>
                                {foreach name="member" item="v2"}
                                {if condition="$v2.id eq $v.userid"} {$v2.nickname}{/if}
                                {/foreach}
                            </td>
                            <td><?php echo date("Y-m-d",$v['register_time']) ?></td>
                            <td>{$v.source}</td>
                            <td>{$v.status}</td>
                            <!--<td class="m-opt"><a href="{:url('add', ['id' => $v.id])}" title="编辑"><i class="icon-pencil"></i></a><a href="javascript:;" title="删除" class="u-del" data-id="{$v.id}"><i class="icon-trash"></i></a></td>-->
                        </tr>
                        {/foreach}
                    </tbody>
                </table>
            </form>
            {include file="public:page" /}
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}
{include file="laypage" /}
{/block}